package com.his.system.manager.service.impl;

import com.his.system.manager.dto.PatientDrugListDto;
import com.his.system.manager.dto.PatientcostsListDto;
import com.his.system.manager.entity.RegisterEntity;
import com.his.system.manager.mapper.RegisterMapper;
import com.his.system.manager.service.IRegisterService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * IRegisterService实现类
 *
 * @Description
 * @Author Admin
 * @Date 2020-07-17 21:20:05
 */
@Service
public class RegisterServiceImpl implements IRegisterService {
    @Autowired
    private RegisterMapper mapper;

    @Override
    public Integer addEntity(RegisterEntity entity) {
        Integer res = mapper.insert(entity);
        return res;
    }

    @Override
    public Integer updateByPrimaryKeySelective(RegisterEntity entity) {
        Integer res = mapper.updateByPrimaryKeySelective(entity);
        return res;
    }

    @Override
    public List<RegisterEntity> selectByEntity(RegisterEntity entity) {
        return mapper.selectByEntity(entity);
    }

    @Override
    public List<PatientcostsListDto> selectPatientcostsByCaseNumber(String casenumber) {
        return mapper.selectPatientcostsByCaseNumber(casenumber);
    }
    @Override
    public List<PatientDrugListDto> selectPatientDrug(String drugsTempID) {
        return mapper.selectPatientDrug(drugsTempID);
    }

    @Override
    public RegisterEntity findByCasenumber(String casenumber) {
        return mapper.findByCasenumber(casenumber);
    }
}